package cn.com.epicc.wap.epe.product.controller;

import cn.com.epicc.wap.epe.common.result.Result;
import cn.com.epicc.wap.epe.product.vo.GroupVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description: 产品组件控制层
 * Author: lishangmin
 * Created: 2018-06-07 09:54
 */
@Api("产品显示组API")
@RestController
@RequestMapping("/group")
public class GroupController {

    @ApiOperation("产品显示组添加")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "productKey", value = "产品主键" , required = true, paramType = "form"),
            @ApiImplicitParam(name = "groupCode", value = "显示组代码" , required = true, paramType = "form"),
    })
    @RequestMapping(value = "/add",method = RequestMethod.POST)
    public Result add(
            @RequestParam(value = "productKey")String productKey,
            @RequestParam(value = "groupCode")String groupCode
    ){
        return Result.success();
    }

    @ApiOperation("产品显示组删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "productKey", value = "产品主键" , required = true, paramType = "form"),
            @ApiImplicitParam(name = "groupCode", value = "显示组代码" , required = true, paramType = "form"),
    })
    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public Result delete(
            @RequestParam(value = "productKey")String productKey,
            @RequestParam(value = "groupCode")String groupCode
    ){
        return Result.success();
    }

    @ApiOperation("产品显示组查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "productKey", value = "产品主键" , required = true, paramType = "form"),
            @ApiImplicitParam(name = "groupCode", value = "显示组代码" , required = true, paramType = "form"),
    })
    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public Result<GroupVo> list(
            @RequestParam(value = "productKey")String productKey,
            @RequestParam(value = "groupCode")String groupCode
    ){
        return Result.success(new GroupVo());
    }


}
